feat: add hm.py.uv toolchain + dogfood CI pipeline#13
Merged
Conversation
New py.uv sub-namespace for uv-managed Python projects. Adds run(), build(), lock_check(), publish() beyond the existing test/lint/fmt/typecheck surface. hm.python() stays unchanged for backwards compat.
Mirrors the Python DSL's hm.py.uv() — uv-managed Python projects with run(), build(), lockCheck(), publish() methods.
Uses hm.py.uv() for Python DSL checks and hm.rust() for workspace build/test/clippy/fmt. Demonstrates the new py.uv namespace with run() escape hatch for custom pytest args.
Fix RUF022 (unsorted __all__) by moving "py" to correct alphabetical position. Add TypeScript variant of the dogfood CI pipeline alongside the existing Python one.
Builds hm from source, installs harmont-py into system Python, and executes .harmont/ci.py through the hm binary — the repo now CI-tests itself through its own tool.
Drop fmt() (normal CI doesn't check formatting) and scope mypy to package dir only (normal CI runs mypy harmont, not mypy .).
- typecheck(paths="src") or typecheck(paths=["src", "tests"]) to scope mypy to specific directories (defaults to "." as before) - Applied to PythonToolchain and UvProject in both Python and TS DSLs - ruff format across all harmont-py source and test files - Dogfood pipelines now use typecheck(paths="harmont")
Move use-items before statements (items_after_statements) and remove trailing commas in macro args (unnecessary_trailing_comma).
The full cargo test runs integration tests that need python3, which isn't available in the bare Rust Docker container.
RustToolchain has no run() method; use installed step directly with cargo env sourcing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hm.py.uv()namespace in both Python and TypeScript DSLs — a dedicated uv-managed Python project toolchain withrun(),build(),lock_check()/lockCheck(), andpublish()methods beyond the existingtest/lint/fmt/typechecksurface..harmont/ci.py— dogfood pipeline that useshm.py.uv()for Python DSL checks andhm.rust()for Cargo workspace build/test/clippy/fmt.New API
Python DSL:
TypeScript DSL:
Existing
hm.python()is unchanged — backwards compatible.Pipeline DAG
Test plan
test_py_uv.py) — all pass, 399 total no regressionspy/uv.test.ts) — all pass, 278 total no regressionstsc --noEmitcleanruff checkclean on new files